![]() |
PATH![]() |
![]() ![]() |
Here's how to declare a menu title drawing function, if you were to name the function MyMenuTitleDrawingProc :
pascal void (MyMenuTitleDrawingProc)
(const Rect *inBounds,
SInt16 inDepth,
Boolean inIsColorDevice,
SInt32 inUserData);
At the time your menu title drawing function is called, the foreground text color and mode is already set to draw in the correct state (enabled, selected, disabled) and correct color for the theme. You do not need to set the color unless you have special drawing needs. If you do have special drawing needs, you should supply the inDepth value and the value of the inIsColorDevice parameter to the function IsThemeInColor to determine whether or not you should draw the menu title content in color.
Note that the Appearance Manager calls your MyMenuTitleDrawingProc function for every device that the inBounds rectangle intersects.
The Appearance Manager draws the background of the menu title prior to calling your menu title drawing function, so you should not erase the title's background from this function.